package view.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import view.MainFrame;
import view.PauseMenu;

/**
 * This class gives functionality to the exit to main menu
 * button in the pause Menu.
 * 
 * @author Stephanie
 *
 */
public class PauseExitListener implements ActionListener {

	private MainFrame mainFrame;
	private PauseMenu pauseMenu;
	
	public PauseExitListener( MainFrame mainFrame, PauseMenu pauseMenu ) {
		this.mainFrame = mainFrame;
		this.pauseMenu = pauseMenu;
	}
	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Add pause toggle capabilities
		pauseMenu.setVisible(false);
		mainFrame.changeActivePanel( "MAIN_MENU" );
	}

}
